package plus.ldl.ldltest;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import plus.ldl.ldltest.pojo.User;
import plus.ldl.ldltest.service.impl.UserServiceImpl;

import java.util.List;

/**
 * @author ldl.plus
 * @date 2020年04月29日  17:09
 */
@EnableAspectJAutoProxy
@ComponentScan("plus.ldl.ldltest.*")
public class TestApplication {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(TestApplication.class);
        UserServiceImpl userService = (UserServiceImpl) context.getBean("userServiceImpl");
        List<User> users = userService.findAll();
        System.out.println("users = " + users);
    }
}
